// src/utils/nprogress.ts
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

// 配置NProgress
NProgress.configure({
  easing: 'ease',
  speed: 500,
  showSpinner: true,
  trickleSpeed: 200,
  minimum: 0.3,
})
export const startProgress = () => NProgress.start()
export const closeProgress = () => NProgress.done()
export const setProgress = (n: number) => NProgress.set(n)

export default NProgress
